Validation Result
A result of any type T that is wrapped with an optional error message
Used to provide contextual error information "upstream" of where the error was encountered, which allows for better logging where upstream elements can collate error messages passed back to them into an organized and sensible error log.
This class has a private constructor to force the use of the pre-defined static instantiation methods
Author
fzzyhmstrs
Since
0.1.0
Parameters
result type, can be nullable
Functions
Adds another test, and potentially another error, to a Validation.
reports error, if any, to a provided reporter (such as a logger)
reports error, if any, to a provided string list
Creates a new ValidationResult of type T wrapping the new value with the error(if any) from the receiver ValdiationResult (of any type, does not need to match T)
Writes an error log to console if this validation result is errored
Writes a warning log to console if this validation result is errored